(defconstant demolst '(nil 1 2 nil 3 nil 4 nil))

;a 
(defun summit-a (lst)
  (apply #'+ (remove nil lst)))
;b
(defun summit-a-r (lst)
  (if (null lst)
    0
    (if (null (car lst))
      (summit-a-r (cdr lst))
      (+ (car lst) (summit-a-r (cdr lst))))))

(format t "非递归方式:~A~%" (summit-a demolst))
(format t "递归方式:~A~%" (summit-a-r demolst))
